package com.zs.propertymanage.dataObj.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class Message {

    public static Integer TYPE_SYSTEM = 0;
    public static Integer TYPE_MANAGER = 1;
    public static Integer TYPE_EMPLOYEE = 2;
    public static Integer TYPE_TENANT = 3;
    public static String ID_SYSTEM = "0";

    private String id;
    private String title;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    private String content;
    private Integer receiverType = 0;
    private String receiverId = "0";
    private Integer senderType = 0;
    private String senderId = "0";

    public Message() {
    }

    // 全参构造函数
    public Message(String id, String title, LocalDateTime now, String content, Integer receiverType, String receiverId, Integer senderType, String senderId) {
        this.id = id;
        this.title = title;
        this.createTime = now;
        this.content = content;
        this.receiverType = receiverType;
        this.receiverId = receiverId;
        this.senderType = senderType;
        this.senderId = senderId;
    }

}
